home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Video
/
World of Video.iso
/
gfxprograms
/
3dprograms
/
rayshade-4.0
/
rayfiles
/
rsdefs
/
objects
/
font.rh
< prev
next >
Wrap
Text File
|
1995-02-13
|
37KB
|
1,239 lines
/************************************************************************
*
* font.rh
*
* This is an #include file for the Rayshade Standard Header
* Files. It defines the font superprimitives in the package.
*
* Please do not edit this file, or any of the other files in
* this package! Make additions to these in your own separate
* file. If you think you have something that should be added
* permanently, please send it to Larry Coffin and/or David
* DeBry (email addresses listed below). If we include it in
* the next release, we'll put your name in the contributor's
* list.
*
* Contributors (in alphabetical order):
* Paul Chamberlain <tif@austin.ibm.com>
* Larry Coffin <lcoffin@clciris.chem.umr.edu>
* David DeBry <ddebry@dsd.es.com>
* Eric Fontano <fontano@hydra.rose.brandeis.edu>
* Dan Peisach <peisach@hydra.rose.brandeis.edu>
*/
#ifndef RSHF_FONT
#define RSHF_FONT
/* Ratio of height of lower and upper case letters */
#define RSPv0004_ratio 0.7 /* DO NOT SET BELOW 0.6 */
#define RSPv0005_Aratio (1-RSPv0004_ratio)
#define RSPv0006_gap (1-2*(1-RSPv0004_ratio))
/***********************************************************************
* These are ascii character definitions for your convenience!
*/
#define RSPfont_33 RSPfont_exclamation
#define RSPfont_34 RSPfont_quotes
#define RSPfont_35 RSPfont_pound
#define RSPfont_36 RSPfont_dollar
#define RSPfont_37 RSPfont_percent
#define RSPfont_38 RSPfont_ampersand
#define RSPfont_39 RSPfont_apostrophe
#define RSPfont_40 RSPfont_leftp
#define RSPfont_41 RSPfont_rightp
#define RSPfont_42 RSPfont_asterisk
#define RSPfont_43 RSPfont_plus
#define RSPfont_44 RSPfont_comma
#define RSPfont_45 RSPfont_minus
#define RSPfont_46 RSPfont_period
#define RSPfont_47 RSPfont_slash
#define RSPfont_48 RSPfont_0
#define RSPfont_49 RSPfont_1
#define RSPfont_50 RSPfont_2
#define RSPfont_51 RSPfont_3
#define RSPfont_52 RSPfont_4
#define RSPfont_53 RSPfont_5
#define RSPfont_54 RSPfont_6
#define RSPfont_55 RSPfont_7
#define RSPfont_56 RSPfont_8
#define RSPfont_57 RSPfont_9
#define RSPfont_58 RSPfont_colon
#define RSPfont_59 RSPfont_semicolon
#define RSPfont_60 RSPfont_less
#define RSPfont_61 RSPfont_equals
#define RSPfont_62 RSPfont_greater
#define RSPfont_63 RSPfont_question
#define RSPfont_64 RSPfont_at
#define RSPfont_65 RSPfont_A
#define RSPfont_66 RSPfont_B
#define RSPfont_67 RSPfont_C
#define RSPfont_68 RSPfont_D
#define RSPfont_69 RSPfont_E
#define RSPfont_70 RSPfont_F
#define RSPfont_71 RSPfont_G
#define RSPfont_72 RSPfont_H
#define RSPfont_73 RSPfont_I
#define RSPfont_74 RSPfont_J
#define RSPfont_75 RSPfont_K
#define RSPfont_76 RSPfont_L
#define RSPfont_77 RSPfont_M
#define RSPfont_78 RSPfont_N
#define RSPfont_79 RSPfont_O
#define RSPfont_80 RSPfont_P
#define RSPfont_81 RSPfont_Q
#define RSPfont_82 RSPfont_R
#define RSPfont_83 RSPfont_S
#define RSPfont_84 RSPfont_T
#define RSPfont_85 RSPfont_U
#define RSPfont_86 RSPfont_V
#define RSPfont_87 RSPfont_W
#define RSPfont_88 RSPfont_X
#define RSPfont_89 RSPfont_Y
#define RSPfont_90 RSPfont_Z
#define RSPfont_91 RSPfont_leftb
#define RSPfont_92 RSPfont_backslash
#define RSPfont_93 RSPfont_rightb
#define RSPfont_94 RSPfont_carat
#define RSPfont_95 RSPfont_underscore
#define RSPfont_96 RSPfont_backapostrophe
#define RSPfont_97 RSPfont_a
#define RSPfont_98 RSPfont_b
#define RSPfont_99 RSPfont_c
#define RSPfont_100 RSPfont_d
#define RSPfont_101 RSPfont_e
#define RSPfont_102 RSPfont_f
#define RSPfont_103 RSPfont_g
#define RSPfont_104 RSPfont_h
#define RSPfont_105 RSPfont_i
#define RSPfont_106 RSPfont_j
#define RSPfont_107 RSPfont_k
#define RSPfont_108 RSPfont_l
#define RSPfont_109 RSPfont_m
#define RSPfont_110 RSPfont_n
#define RSPfont_111 RSPfont_o
#define RSPfont_112 RSPfont_p
#define RSPfont_113 RSPfont_q
#define RSPfont_114 RSPfont_r
#define RSPfont_115 RSPfont_s
#define RSPfont_116 RSPfont_t
#define RSPfont_117 RSPfont_u
#define RSPfont_118 RSPfont_v
#define RSPfont_119 RSPfont_w
#define RSPfont_120 RSPfont_x
#define RSPfont_121 RSPfont_y
#define RSPfont_122 RSPfont_z
#define RSPfont_123 RSPfont_left_brace
#define RSPfont_124 RSPfont_pipe
#define RSPfont_125 RSPfont_right_brace
#define RSPfont_126 RSPfont_tilde
#define toparc(t) \
intersect \
torus 0.5 (t) 0.5 0 1.5 0 1 0 \
box -1 -1 1.5 2 1 3 \
end
#define botarc(t) \
intersect \
torus 0.5 (t) 0.5 0 0.5 0 1 0 \
box -1 -1 -1 2 1 0.5 \
end
#define upperquarter(t) \
intersect \
torus 0.5 (t) 0.5 0 1.5 0 1 0 \
box 0.5 -1 1.5 2 1 3 \
end
#define upperleftquarter(t) \
intersect \
torus 0.5 (t) 0.5 0 1.5 0 1 0 \
box 0.5 -1 1.5 -2 1 3 \
end
#define upperarc(t) \
intersect \
torus 0.5 (t) 0.5 0 1.5 0 1 0 \
box 0.5 -1 0 2 1 3 \
end
#define lowerquarter(t) \
intersect \
torus 0.5 (t) 0.5 0 0.5 0 1 0 \
box 0.5 -1 -1 2 1 0.5 \
end
#define lowerleftquarter(t) \
intersect \
torus 0.5 (t) 0.5 0 0.5 0 1 0 \
box -1 -1 -1 0.5 1 0.5 \
end
#define lowerarc(t) \
intersect \
torus 0.5 (t) 0.5 0 0.5 0 1 0 \
box 0.5 -1 -1 2 1 2 \
end
#define corner(t) \
intersect \
torus (t) (t) 0 0 0 0 1 0 \
box 0 -1 0 1 1 1 \
end
#define upperleft(t) corner(t) \
rotate 0 1 0 -90 translate (t) 0 (2-(t))
#define lowerleft(t) corner(t) \
rotate 0 1 0 180 translate (t) 0 (t)
/*
* A cylinder with a sphere on each end.
*/
#define cylsphere(len,t) \
list \
cylinder (t) 0 0 0 0 0 (len) \
sphere (t) 0 0 0 \
sphere (t) 0 0 (len) \
end
/*
* A cylinder with a sphere on one end and a disc on the other.
*/
#define cyldisc(len,t) \
list \
cylinder (t) 0 0 0 0 0 (len) \
sphere (t) 0 0 0 \
end
/***********/
#define RSPfont_exclamation(prefix,t) \
prefix list \
sphere (t) 0.5 0 0 \
cylsphere(1.5,t) translate 0.5 0 0.5 \
end
#define RSPfont_quotes(prefix,t) \
prefix list \
cylsphere(0.5,t) translate 0.3 0 1.5 \
cylsphere(0.5,t) translate 0.7 0 1.5 \
end
#define RSPfont_pound(prefix,t) \
prefix list \
cylinder (t) 0.15 0 0 0.35 0 2 \
cylinder (t) 0.65 0 0 0.85 0 2 \
sphere (t) 0.15 0 0 \
sphere (t) 0.35 0 2 \
sphere (t) 0.65 0 0 \
sphere (t) 0.85 0 2 \
cylinder (t) 0 0 0.667 1 0 0.667 \
cylinder (t) 0 0 1.333 1 0 1.333 \
sphere (t) 0 0 0.667 \
sphere (t) 1 0 0.667 \
sphere (t) 0 0 1.333 \
sphere (t) 1 0 1.333 \
end
#define RSPfont_dollar(prefix,t) \
prefix list \
intersect \
torus (RSPv0004_ratio/2) (t) \
(RSPv0004_ratio/2) 0 (1.5*RSPv0004_ratio) \
0 1 0 \
box -1 -1 (RSPv0004_ratio-(t)) (RSPv0004_ratio/2) 1 3 \
end translate 0 0 (RSPv0005_Aratio) \
intersect \
torus (RSPv0004_ratio/2) (t) \
(1-RSPv0004_ratio/2) 0 (1.5*RSPv0004_ratio) \
0 1 0 \
box (1-RSPv0004_ratio/2) -1 (1.5*RSPv0004_ratio) 2 1 3 \
end translate 0 0 (RSPv0005_Aratio) \
intersect \
torus (RSPv0004_ratio/2) (t) \
(RSPv0004_ratio/2) 0 (.5*RSPv0004_ratio) \
0 1 0 \
box -1 -1 (.5*RSPv0004_ratio) (RSPv0004_ratio/2) 1 -1 \
end translate 0 0 (RSPv0005_Aratio) \
intersect \
torus (RSPv0004_ratio/2) (t) \
(1-RSPv0004_ratio/2) 0 (.5*RSPv0004_ratio) \
0 1 0 \
box (1-RSPv0004_ratio/2) -1 (RSPv0004_ratio+(t)) 2 1 -1 \
end translate 0 0 (RSPv0005_Aratio) \
cylinder (t) \
(RSPv0004_ratio/2) 0 (RSPv0005_Aratio) \
(1-RSPv0004_ratio/2) 0 (RSPv0005_Aratio) \
cylinder (t) \
(RSPv0004_ratio/2) 0 1 \
(1-RSPv0004_ratio/2) 0 1 \
cylinder (t) \
(RSPv0004_ratio/2) 0 (1+RSPv0004_ratio) \
(1-RSPv0004_ratio/2) 0 (1+RSPv0004_ratio) \
sphere (t) 0 0 (RSPv0004_ratio/2+RSPv0005_Aratio) \
sphere (t) 1 0 (1+0.5*RSPv0004_ratio) \
cylsphere(2,t) translate 0.333 0 0 \
cylsphere(2,t) translate 0.667 0 0 \
end
#define RSPfont_percent(prefix,t) \
prefix list \
torus 0.25 (t) 0.25 0 1.75 0 1 0 \
torus 0.25 (t) 0.75 0 0.25 0 1 0 \
cylinder (t) 0 0 0 1 0 2 \
sphere (t) 0 0 0 \
sphere (t) 1 0 2 \
end
#define RSPfont_ampersand(prefix,t) \
prefix list \
sphere (t) 0.5 0 0 \
end
#define RSPfont_apostrophe(prefix,t) \
prefix list \
cylsphere(0.5,t) translate 0.5 0 1.5 \
end
#define RSPfont_leftp(prefix,t) \
prefix list \
intersect \
torus .5 (t) 0.75 0 1.5 0 1 0 \
box -1 -1 1.5 .75 1 3 \
end \
intersect \
torus .5 (t) .75 0 .5 0 1 0 \
box -1 -1 -1 .75 1 .5 \
end \
cylinder (t) 0.25 0 .5 0.25 0 1.5 \
sphere (t) .75 0 0 \
sphere (t) .75 0 2 \
end
#define RSPfont_rightp(prefix,t) \
prefix list \
intersect \
torus .5 (t) 0.25 0 1.5 0 1 0 \
box .25 -1 1.5 2 1 3 \
end \
intersect \
torus .5 (t) .25 0 .5 0 1 0 \
box .25 -1 -1 2 1 .5 \
end \
cylinder (t) 0.75 0 .5 0.75 0 1.5 \
sphere (t) .25 0 0 \
sphere (t) .25 0 2 \
end
#define RSPfont_asterisk(prefix,t) \
prefix list \
cylinder (t) .2 0 .4 .8 0 1.6 \
cylinder (t) .2 0 1.6 .8 0 .4 \
cylinder (t) 0 0 1 1 0 1 \
sphere (t) .2 0 .4 \
sphere (t) .8 0 .4 \
sphere (t) 1 0 1 \
sphere (t) .8 0 1.6 \
sphere (t) .2 0 1.6 \
sphere (t) 0 0 1 \
end
#define RSPfont_plus(prefix,t) \
prefix list \
cylsphere(1,t) translate 0.5 0 0.5 \
cylinder (t) 0 0 1 1 0 1 \
sphere (t) 0 0 1 \
sphere (t) 1 0 1 \
end
#define RSPfont_comma(prefix,t) \
prefix list \
cylinder (t) 0.2 0 0.1 0 0 -0.3 \
sphere (t) 0.2 0 0.1 \
sphere (t) 0 0 -0.3 \
end
#define RSPfont_minus(prefix,t) \
prefix list \
cylinder (t) 0 0 1 1 0 1 \
sphere (t) 0 0 1 \
sphere (t) 1 0 1 \
end
#define RSPfont_period(prefix,t) \
prefix list \
sphere (t) 0.5 0 0 \
end
#define RSPfont_slash(prefix,t) \
prefix list \
cylinder (t) 0 0 0 1 0 2 \
sphere (t) 0 0 0 \
sphere (t) 1 0 2 \
end
#define RSPfont_0(prefix,t) \
prefix list \
toparc(t) \
cylinder (t) 0 0 0.5 0 0 1.5 \
botarc(t) \
cylinder (t) 1 0 0.5 1 0 1.5 \
cylinder (t) 0 0 0 1 0 2 \
sphere (t) 1 0 2 \
sphere (t) 0 0 0 \
end
#define RSPfont_1(prefix,t) \
prefix list \
cylsphere(2,t) translate 0.5 0 0 \
cylinder (t) 0.5 0 2 0.3 0 1.7 \
sphere (t) 0.3 0 1.8 \
end
#define RSPfont_2(prefix,t) \
prefix list \
sphere (t) 0 0 1.5 \
toparc(t) \
cylsphere(0.125,t) translate 1 0 1.375 \
lowerquarter(t) translate 0 0 0.875 \
upperleftquarter(t) translate 0 0 -1.125 \
cylsphere(0.375,t) translate 0 0 0 \
cylinder (t) 0 0 0 1 0 0 \
sphere (t) 1 0 0 \
end
#define RSPfont_3(prefix,t) \
prefix list \
upperarc(t) \
lowerarc(t) \
toparc(t) \
botarc(t) \
sphere (t) 0 0 1.5 \
sphere (t) 0 0 0.5 \
sphere (t) 0.5 0 1 \
end
#define RSPfont_4(prefix,t) \
prefix list \
cylsphere(2,t) translate 0.8 0 0 \
cylinder (t) 0.8 0 2 0 0 .7 \
sphere (t) 0 0 0.7 \
cylinder (t) 0 0 0.7 1 0 0.7 \
sphere (t) 1 0 0.7 \
end
#define RSPfont_5(prefix,t) \
prefix list \
botarc(t) \
sphere (t) 0 0 0.5 \
cylinder (t) 1 0 0.5 1 0 1 \
toparc(t) \
scale 1 1 .75 translate 0 0 -0.125 \
sphere (t) 0 0 0 \
scale 1 1 0.75 translate 0 0 1 \
cylinder (t) 0 0 1 0 0 2 \
sphere (t) 0 0 2 \
sphere (t) 1 0 2 \
cylinder (t) 0 0 2 1 0 2 \
end
#define RSPfont_6(prefix,t) \
prefix list \
toparc(t) \
botarc(t) \
toparc(t) translate 0 0 -0.875 \
cylinder (t) 1 0 0.5 1 0 0.625 \
cylinder (t) 0 0 0.5 0 0 1.5 \
sphere (t) 1 0 1.5 \
end
#define RSPfont_7(prefix,t) \
prefix list \
sphere (t) 0 0 2 \
cylinder (t) 0 0 2 1 0 2 \
sphere (t) 1 0 2 \
cylinder (t) 1 0 2 0.25 0 0 \
sphere (t) 0.25 0 0 \
end
#define RSPfont_8(prefix,t) \
prefix list \
toparc(t) \
toparc(t) translate 0 0 -1 \
botarc(t) \
botarc(t) translate 0 0 1 \
end
#define RSPfont_9(prefix,t) \
prefix list \
toparc(t) \
botarc(t) \
botarc(t) translate 0 0 0.875 \
cylinder (t) 1 0 1.5 1 0 0.5 \
cylinder (t) 0 0 1.5 0 0 1.375 \
sphere (t) 0 0 0.5 \
end
#define RSPfont_colon(prefix,t) \
prefix list \
sphere (t) 0.5 0 1.5 \
sphere (t) 0.5 0 0.5 \
end
#define RSPfont_semicolon(prefix,t) \
prefix list \
sphere (t) 0.5 0 1.5 \
cylinder (t) 0.5 0 0.5 0.3 0 0.1 \
sphere (t) 0.5 0 0.5 \
sphere (t) 0.3 0 0.1 \
end
#define RSPfont_less(prefix,t) \
prefix list \
sphere (t) 0.75 0 1.5 \
cylinder (t) 0.25 0 1 0.75 0 1.5 \
sphere (t) 0.25 0 1 \
cylinder (t) 0.25 0 1 0.75 0 0.5 \
sphere (t) 0.75 0 0.5 \
end
#define RSPfont_equals(prefix,t) \
prefix list \
sphere (t) 0.1 0 0.75 \
sphere (t) .9 0 0.75 \
cylinder (t) 0.1 0 0.75 0.9 0 0.75 \
cylinder (t) 0.1 0 1.25 0.9 0 1.25 \
sphere (t) 0.1 0 1.25 \
sphere (t) 0.9 0 1.25 \
end
#define RSPfont_greater(prefix,t) \
prefix list \
sphere (t) 0.25 0 1.5 \
cylinder (t) 0.75 0 1 0.25 0 1.5 \
sphere (t) 0.75 0 1 \
cylinder (t) 0.75 0 1 0.25 0 0.5 \
sphere (t) 0.25 0 0.5 \
end
#define RSPfont_question(prefix,t) \
prefix list \
sphere (t) 0 0 1.5 \
toparc(t) \
intersect \
torus 0.5 (t) 0.5 0 1.5 0 1 0 \
box 0.5 -1 0 2 1 1.5 \
end \
intersect \
torus 0.25 (t) 0.5 0 0.75 0 1 0 \
box 0 -1 0.75 0.5 1 2 \
end \
cylinder (t) 0.25 0 .75 0.25 0 0.5 \
sphere (t) 0.25 0 0.5 \
sphere (t) 0.25 0 0 \
end
#define RSPfont_at(prefix,t) \
prefix list \
sphere (t) 0.5 0 0 \
end
#define RSPfont_A(prefix,t) \
prefix list \
cylinder (t) 0 0 0 0.5 0 2 \
cylinder (t) 1 0 0 0.5 0 2 \
cylinder (t) (0.5-0.4*0.5) 0 0.8 (0.5+0.4*0.5) 0 0.8 \
sphere (t) 0.5 0 2 \
sphere (t) 0 0 0 \
sphere (t) 1 0 0 \
end
#define RSPfont_B(prefix,t) \
prefix list \
cylinder (t) 0 0 0 0 0 2 \
cylinder (t) 0 0 2 0.5 0 2 \
cylinder (t) 0 0 1 0.5 0 1 \
cylinder (t) 0 0 0 0.5 0 0 \
upperarc(t) \
lowerarc(t) \
sphere (t) 0 0 0 \
sphere (t) 0 0 2 \
end
#define RSPfont_C(prefix,t) \
prefix list \
toparc(t) \
cylinder (t) 0 0 0.5 0 0 1.5 \
botarc(t) \
sphere (t) 1 0 1.5 \
sphere (t) 1 0 0.5 \
end
#define RSPfont_D(prefix,t) \
prefix list \
cylinder (t) 0 0 0 0 0 2 \
cylinder (t) 0 0 2 0.5 0 2 \
cylinder (t) 1 0 0.5 1 0 1.5 \
cylinder (t) 0 0 0 0.5 0 0 \
upperquarter(t) \
lowerquarter(t) \
sphere (t) 0 0 0 \
sphere (t) 0 0 2 \
end
#define RSPfont_E(prefix,t) \
prefix list \
cylinder (t) 0 0 0 0 0 2 \
cylinder (t) 0 0 0 1 0 0 \
cylinder (t) 0 0 2 1 0 2 \
cylinder (t) 0 0 1 0.75 0 1 \
sphere (t) 0 0 0 \
sphere (t) 0 0 2 \
sphere (t) 1 0 0 \
sphere (t) 1 0 2 \
sphere (t) 0.75 0 1 \
end
#define RSPfont_F(prefix,t) \
prefix list \
cylinder (t) 0 0 0 0 0 2 \
cylinder (t) 0 0 2 1 0 2 \
cylinder (t) 0 0 1 0.75 0 1 \
sphere (t) 0 0 0 \
sphere (t) 0 0 2 \
sphere (t) 1 0 2 \
sphere (t) 0.75 0 1 \
end
#define RSPfont_G(prefix,t) \
prefix list \
toparc(t) \
cylinder (t) 0 0 0.5 0 0 1.5 \
botarc(t) \
cylinder (t) 1 0 0.8 1 0 0.5 \
sphere (t) 1 0 1.5 \
cylinder (t) 0.6 0 0.8 1 0 0.8 \
sphere (t) 1 0 0.8 \
sphere (t) 0.6 0 0.8 \
end
#define RSPfont_H(prefix,t) \
prefix list \
cylsphere(2,t) translate 0 0 0 \
cylsphere(2,t) translate 1 0 0 \
cylinder (t) 0 0 1 1 0 1 \
end
#define RSPfont_I(prefix,t) \
prefix list \
cylinder THICK 0.5 0 0 0.5 0 2 \
cylinder THICK 0 0 0 1 0 0 \
cylinder THICK 0 0 2 1 0 2 \
sphere THICK 0 0 0 \
sphere THICK 1 0 0 \
sphere THICK 0 0 2 \
sphere THICK 1 0 2 \
end
#define RSPfont_J(prefix,t) \
prefix list \
cyldisc(1.5,t) rotate 0 1 0 180 translate 1 0 2 \
botarc(t) \
sphere (t) 0 0 0.5 \
end
#define RSPfont_K(prefix,t) \
prefix list \
cylinder (t) 0 0 0 0 0 2 \
cylinder (t) 1 0 2 0 0 1 \
cylinder (t) 1 0 0 0.5 0 1.5 \
sphere (t) 0 0 0 \
sphere (t) 0 0 2 \
sphere (t) 1 0 2 \
sphere (t) 1 0 0 \
end
#define RSPfont_L(prefix,t) \
prefix list \
cylinder (t) 0 0 0 0 0 2 \
cylinder (t) 0 0 0 1 0 0 \
sphere (t) 0 0 0 \
sphere (t) 0 0 2 \
sphere (t) 1 0 0 \
end
#define RSPfont_M(prefix,t) \
prefix list \
cylsphere(2,t) translate 0 0 0 \
cylsphere(2,t) translate 1 0 0 \
cylinder (t) 0 0 2 0.5 0 1 \
cylinder (t) 1 0 2 0.5 0 1 \
sphere (t) 0.5 0 1 \
end
#define RSPfont_N(prefix,t) \
prefix list \
cylsphere(2,t) translate 0 0 0 \
cylsphere(2,t) translate 1 0 0 \
cylinder (t) 0 0 2 1 0 0 \
end
#define RSPfont_O(prefix,t) \
prefix list \
toparc(t) \
cylinder (t) 0 0 0.5 0 0 1.5 \
botarc(t) \
cylinder (t) 1 0 0.5 1 0 1.5 \
end
#define RSPfont_P(prefix,t) \
prefix list \
cylinder (t) 0 0 0 0 0 2 \
cylinder (t) 0 0 2 0.5 0 2 \
cylinder (t) 0 0 1 0.5 0 1 \
upperarc(t) \
sphere (t) 0 0 0 \
sphere (t) 0 0 2 \
end
#define RSPfont_Q(prefix,t) \
prefix list \
toparc(t) \
cylinder (t) 0 0 0.5 0 0 1.5 \
botarc(t) \
cylinder (t) 1 0 0.5 1 0 1.5 \
cylinder (t) 1 0 0 0.6 0 0.8 \
sphere (t) 1 0 0 \
sphere (t) 0.6 0 0.8 \
end
#define RSPfont_R(prefix,t) \
prefix list \
cylinder (t) 0 0 0 0 0 2 \
cylinder (t) 0 0 2 0.5 0 2 \
cylinder (t) 0 0 1 0.5 0 1 \
upperarc(t) \
sphere (t) 0 0 0 \
sphere (t) 0 0 2 \
upperarc(t) \
upperquarter(t) translate 0 0 -1 \
cyldisc(0.5,t) translate 1 0 0 \
end
#define RSPfont_S(prefix,t) \
prefix list \
sphere (t) 1 0 1.5 \
toparc(t) \
lowerleftquarter(t) translate 0 0 1 \
upperquarter(t) translate 0 0 -1 \
botarc(t) \
sphere (t) 0 0 0.5 \
end
#define RSPfont_T(prefix,t) \
prefix list \
cyldisc(2,t) translate 0.5 0 0 \
cylsphere(1,t) \
rotate 0 1 0 90 translate 0 0 2 \
end
#define RSPfont_U(prefix,t) \
prefix list \
cylinder (t) 0 0 0.5 0 0 2 \
botarc(t) \
cylinder (t) 1 0 0.5 1 0 2 \
sphere (t) 0 0 2 \
sphere (t) 1 0 2 \
end
#define RSPfont_V(prefix,t) \
prefix list \
cylinder (t) 0.5 0 0 0 0 2 \
cylinder (t) 0.5 0 0 1 0 2 \
sphere (t) 0 0 2 \
sphere (t) 1 0 2 \
sphere (t) 0.5 0 0 \
end
#define RSPfont_W(prefix,t) \
prefix list \
sphere (t) 0 0 2 \
cylinder (t) 0 0 2 0.15 0 0 \
sphere (t) 0.15 0 0 \
cylinder (t) 0.15 0 0 0.5 0 1 \
sphere (t) 0.5 0 1 \
cylinder (t) .85 0 0 0.5 0 1 \
sphere (t) .85 0 0 \
cylinder (t) .85 0 0 1 0 2 \
sphere (t) 1 0 2 \
end
#define RSPfont_X(prefix,t) \
prefix list \
cylinder (t) 1 0 0 0 0 2 \
cylinder (t) 0 0 0 1 0 2 \
sphere (t) 0 0 2 \
sphere (t) 1 0 2 \
sphere (t) 1 0 0 \
sphere (t) 0 0 0 \
end
#define RSPfont_Y(prefix,t) \
prefix list \
cylinder (t) 0 0 2 0.5 0 1 \
cylinder (t) 1 0 2 0.5 0 1 \
sphere (t) 0 0 2 \
sphere (t) 1 0 2 \
cylsphere(1,t) translate 0.5 0 0 \
end
#define RSPfont_Z(prefix,t) \
prefix list \
cylinder (t) 0 0 2 1 0 2 \
cylinder (t) 0 0 0 1 0 2 \
cylinder (t) 0 0 0 1 0 0 \
sphere (t) 0 0 2 \
sphere (t) 1 0 2 \
sphere (t) 1 0 0 \
sphere (t) 0 0 0 \
end
#define RSPfont_leftb(prefix,t) \
prefix list \
cylsphere(2,t) translate 0.25 0 0 \
cylinder (t) 0.25 0 0 0.75 0 0 \
sphere (t) 0.75 0 0 \
cylinder (t) 0.25 0 2 0.75 0 2 \
sphere (t) 0.75 0 2 \
end
#define RSPfont_backslash(prefix,t) \
prefix list \
cylinder (t) 1 0 0 0 0 2 \
sphere (t) 1 0 0 \
sphere (t) 0 0 2 \
end
#define RSPfont_rightb(prefix,t) \
prefix list \
cylsphere(2,t) translate 0.75 0 0 \
cylinder (t) 0.25 0 0 0.75 0 0 \
sphere (t) 0.25 0 0 \
cylinder (t) 0.25 0 2 0.75 0 2 \
sphere (t) 0.25 0 2 \
end
#define RSPfont_carat(prefix,t) \
prefix list \
cylinder (t) .5 0 2 0 0 1 \
cylinder (t) .5 0 2 1 0 1 \
sphere (t) .5 0 2 \
sphere (t) 0 0 1 \
sphere (t) 1 0 1 \
end
#define RSPfont_underscore(prefix,t) \
prefix list \
cylinder (t) 0 0 (-2*(t)) 1 0 (-2*(t)) \
sphere (t) 0 0 (-2*(t)) \
sphere (t) 1 0 (-2*(t)) \
end
#define RSPfont_backapostrophe(prefix,t) \
prefix list \
cylinder (t) 0.6 0 1.6 0.4 0 2 \
sphere (t) 0.6 0 1.6 \
sphere (t) 0.4 0 2 \
end
#define RSPfont_a(prefix,t) \
prefix list \
toparc(t) translate 0 0 (-2*RSPv0005_Aratio) \
botarc(t) \
cylinder (t) 0 0 0.5 0 0 (0.5+RSPv0006_gap) \
cylsphere(2*RSPv0004_ratio,t) translate 1 0 0 \
end
#define RSPfont_b(prefix,t) \
prefix list \
toparc(t) translate 0 0 (-2*RSPv0005_Aratio) \
botarc(t) \
cylinder (t) 1 0 0.5 1 0 (0.5+RSPv0006_gap) \
cylsphere(2,t) \
end
#define RSPfont_c(prefix,t) \
prefix list \
toparc(t) translate 0 0 (-2*RSPv0005_Aratio) \
cylinder (t) 0 0 0.5 0 0 (0.5+RSPv0006_gap) \
botarc(t) \
sphere (t) 1 0 (0.5+RSPv0006_gap) \
sphere (t) 1 0 0.5 \
end
#define RSPfont_d(prefix,t) \
prefix list \
toparc(t) translate 0 0 (-2*RSPv0005_Aratio) \
botarc(t) \
cylinder (t) 0 0 0.5 0 0 (0.5+RSPv0006_gap) \
cylsphere(2,t) translate 1 0 0 \
end
#define RSPfont_e(prefix,t) \
prefix list \
toparc(t) translate 0 0 (-2*RSPv0005_Aratio) \
cylinder (t) 0 0 0.5 0 0 (0.5+RSPv0006_gap) \
botarc(t) \
sphere (t) 1 0 (0.5+RSPv0006_gap) \
cylinder (t) 0 0 (0.5+RSPv0006_gap) 1 0 (0.5+RSPv0006_gap) \
sphere (t) 1 0 0.5 \
end
#define RSPfont_f(prefix,t) \
prefix list \
sphere (t) .5 0 0 \
cylinder (t) .5 0 0 .5 0 1.5 \
upperleftquarter(t) translate 0.5 0 0 \
sphere (t) 1 0 2 \
cylinder (t) 0.2 0 1 0.8 0 1 \
sphere (t) 0.2 0 1 \
sphere (t) 0.8 0 1 \
end
#define RSPfont_g(prefix,t) \
prefix list \
toparc(t) translate 0 0 (-2*RSPv0005_Aratio) \
botarc(t) \
cylinder (t) 0 0 0.5 0 0 (0.5+RSPv0006_gap) \
cylinder (t) 1 0 (2*RSPv0004_ratio) 1 0 (0-RSPv0006_gap) \
botarc(t) translate 0 0 (-0.5-RSPv0006_gap) \
sphere (t) 1 0 (2*RSPv0004_ratio) \
sphere (t) 0 0 (0-RSPv0006_gap) \
end
#define RSPfont_h(prefix,t) \
prefix list \
toparc(t) translate 0 0 (-2*RSPv0005_Aratio) \
cylsphere(2,t) \
cylinder (t) 1 0 0 1 0 (0.5+RSPv0006_gap) \
sphere (t) 1 0 0 \
end
#define RSPfont_i(prefix,t) \
prefix list \
cylsphere(2*RSPv0004_ratio,t) translate 0.5 0 0 \
sphere (t) 0.5 0 (2*RSPv0004_ratio+RSPv0006_gap+(t)) \
end
#define RSPfont_j(prefix,t) \
prefix list \
cylinder (t) 1 0 (2*RSPv0004_ratio) 1 0 (0-RSPv0006_gap) \
botarc(t) translate 0 0 (-0.5-RSPv0006_gap) \
sphere (t) 1 0 (2*RSPv0004_ratio) \
sphere (t) 0 0 (0-RSPv0006_gap) \
sphere (t) 1 0 (2*RSPv0004_ratio+RSPv0006_gap+(t)) \
end
#define RSPfont_k(prefix,t) \
prefix list \
cylsphere(2,t) \
cylinder (t) \
0 0 (0.6*RSPv0004_ratio) \
1 0 (2*RSPv0004_ratio) \
cylinder (t) \
0.4 0 (0.6*RSPv0004_ratio+0.4*1.4*RSPv0004_ratio) \
1 0 0 \
sphere (t) 1 0 0 \
sphere (t) 1 0 (2*RSPv0004_ratio) \
end
#define RSPfont_l(prefix,t) \
prefix list \
cylsphere(2,t) translate 0.5 0 0 \
end
#define RSPfont_m(prefix,t) \
prefix list \
intersect \
torus 0.25 (t) 0.25 0 (2*RSPv0004_ratio-0.25) 0 1 0 \
box -1 -1 (2*RSPv0004_ratio-0.25) 1 1 3 \
end \
intersect \
torus 0.25 (t) 0.25 0 (2*RSPv0004_ratio-0.25) 0 1 0 \
box -1 -1 (2*RSPv0004_ratio-0.25) 1 1 3 \
end translate 0.5 0 0 \
cylsphere(2*RSPv0004_ratio,t) \
cylinder (t) 0.5 0 0 0.5 0 (2*RSPv0004_ratio-0.25) \
cylinder (t) 1.0 0 0 1.0 0 (2*RSPv0004_ratio-0.25) \
sphere (t) 0.5 0 0 \
sphere (t) 1 0 0 \
end
#define RSPfont_n(prefix,t) \
prefix list \
toparc(t) translate 0 0 (-2*RSPv0005_Aratio) \
cylsphere(2*RSPv0004_ratio,t) \
cylinder (t) 1 0 0 1 0 (0.5+RSPv0006_gap) \
sphere (t) 1 0 0 \
end
#define RSPfont_o(prefix,t) \
prefix list \
toparc(t) translate 0 0 (-2*RSPv0005_Aratio) \
botarc(t) \
cylinder (t) 0 0 0.5 0 0 (0.5+RSPv0006_gap) \
cylinder (t) 1 0 0.5 1 0 (0.5+RSPv0006_gap) \
end
#define RSPfont_p(prefix,t) \
prefix list \
toparc(t) translate 0 0 (-2*RSPv0005_Aratio) \
botarc(t) \
cylinder (t) 1 0 0.5 1 0 (0.5+RSPv0006_gap) \
cylinder (t) \
0 0 (2*RSPv0004_ratio) \
0 0 (0-2*RSPv0006_gap) \
sphere (t) 0 0 (2*RSPv0004_ratio) \
sphere (t) 0 0 (0-2*RSPv0006_gap) \
end
#define RSPfont_q(prefix,t) \
prefix list \
toparc(t) translate 0 0 (-2*RSPv0005_Aratio) \
botarc(t) \
cylinder (t) 0 0 0.5 0 0 (0.5+RSPv0006_gap) \
cylinder (t) \
1 0 (2*RSPv0004_ratio) \
1 0 (0-2*RSPv0006_gap) \
sphere (t) 1 0 (2*RSPv0004_ratio) \
sphere (t) 1 0 (0-2*RSPv0006_gap) \
end
#define RSPfont_r(prefix,t) \
prefix list \
toparc(t) translate 0 0 (-2*RSPv0005_Aratio) \
cylsphere(2*RSPv0004_ratio,t) \
sphere (t) 1 0 (0.5+RSPv0006_gap) \
end
#define RSPfont_s(prefix,t) \
prefix list \
intersect \
torus (RSPv0004_ratio/2) (t) \
(RSPv0004_ratio/2) 0 (1.5*RSPv0004_ratio) \
0 1 0 \
box -1 -1 (RSPv0004_ratio-(t)) (RSPv0004_ratio/2) 1 3 \
end \
intersect \
torus (RSPv0004_ratio/2) (t) \
(1-RSPv0004_ratio/2) 0 (1.5*RSPv0004_ratio) \
0 1 0 \
box (1-RSPv0004_ratio/2) -1 (1.5*RSPv0004_ratio) 2 1 3 \
end \
intersect \
torus (RSPv0004_ratio/2) (t) \
(RSPv0004_ratio/2) 0 (.5*RSPv0004_ratio) \
0 1 0 \
box -1 -1 (.5*RSPv0004_ratio) (RSPv0004_ratio/2) 1 -1 \
end \
intersect \
torus (RSPv0004_ratio/2) (t) \
(1-RSPv0004_ratio/2) 0 (.5*RSPv0004_ratio) \
0 1 0 \
box (1-RSPv0004_ratio/2) -1 (RSPv0004_ratio+(t)) 2 1 -1 \
end \
cylinder (t) \
(RSPv0004_ratio/2) 0 0 \
(1-RSPv0004_ratio/2) 0 0 \
cylinder (t) \
(RSPv0004_ratio/2) 0 (RSPv0004_ratio) \
(1-RSPv0004_ratio/2) 0 (RSPv0004_ratio) \
cylinder (t) \
(RSPv0004_ratio/2) 0 (2*RSPv0004_ratio) \
(1-RSPv0004_ratio/2) 0 (2*RSPv0004_ratio) \
sphere (t) 0 0 (RSPv0004_ratio/2) \
sphere (t) 1 0 (1.5*RSPv0004_ratio) \
end
#define RSPfont_t(prefix,t) \
prefix list \
cylsphere(2,t) translate 0.5 0 0 \
cylinder (t) \
0.2 0 (2*RSPv0004_ratio) \
0.8 0 (2*RSPv0004_ratio) \
sphere (t) 0.2 0 (2*RSPv0004_ratio) \
sphere (t) 0.8 0 (2*RSPv0004_ratio) \
end
#define RSPfont_u(prefix,t) \
prefix list \
botarc(t) \
cylinder (t) 0 0 0.5 0 0 (2*RSPv0004_ratio) \
cylsphere(2*RSPv0004_ratio,t) translate 1 0 0 \
sphere (t) 0 0 (2*RSPv0004_ratio) \
end
#define RSPfont_u_new(prefix,t) \
prefix list \
intersect \
torus (RSPv0004_ratio/2) (t) \
(RSPv0004_ratio/2) 0 (.5*RSPv0004_ratio) \
0 1 0 \
box -1 -1 (.5*RSPv0004_ratio) (RSPv0004_ratio/2) 1 -1 \
end \
intersect \
torus (RSPv0004_ratio/2) (t) \
(1-RSPv0004_ratio/2) 0 (.5*RSPv0004_ratio) \
0 1 0 \
box (1-RSPv0004_ratio/2) -1 (.5*RSPv0004_ratio) 2 1 -1 \
end \
cylinder (t) \
(RSPv0004_ratio/2) 0 0 \
(1-RSPv0004_ratio/2) 0 0 \
cylinder (t) \
0 0 (RSPv0004_ratio/2) \
0 0 (2*RSPv0004_ratio) \
cylsphere(2*RSPv0004_ratio,t) translate 1 0 0 \
sphere (t) 0 0 (2*RSPv0004_ratio) \
end
#define RSPfont_v(prefix,t) \
prefix list \
cylinder (t) 0 0 (2*RSPv0004_ratio) 0.5 0 0 \
cylinder (t) 1 0 (2*RSPv0004_ratio) 0.5 0 0 \
sphere (t) 1 0 (2*RSPv0004_ratio) \
sphere (t) 0 0 (2*RSPv0004_ratio) \
sphere (t) 0.5 0 0 \
end
#define RSPfont_w(prefix,t) \
prefix list \
cylinder (t) 0 0 (2*RSPv0004_ratio) 0.15 0 0 \
cylinder (t) 1 0 (2*RSPv0004_ratio) 0.85 0 0 \
sphere (t) 0 0 (2*RSPv0004_ratio) \
sphere (t) 1 0 (2*RSPv0004_ratio) \
sphere (t) 0.15 0 0 \
sphere (t) 0.85 0 0 \
cylinder (t) 0.15 0 0 0.5 0 RSPv0004_ratio \
cylinder (t) 0.85 0 0 0.5 0 RSPv0004_ratio \
sphere (t) 0.5 0 RSPv0004_ratio \
end
#define RSPfont_w2(prefix,t) \
prefix list \
sphere (t) 0 0 (2*RSPv0004_ratio) \
cylinder (t) 0 0 (2*RSPv0004_ratio) 0.25 0 0 \
sphere (t) 0.25 0 0 \
cylinder (t) 0.5 0 (2*RSPv0004_ratio) 0.25 0 0 \
sphere (t) 0.5 0 (2*RSPv0004_ratio) \
cylinder (t) 0.5 0 (2*RSPv0004_ratio) 0.75 0 0 \
sphere (t) 0.75 0 0 \
cylinder (t) 1 0 (2*RSPv0004_ratio) 0.75 0 0 \
sphere (t) 1 0 (2*RSPv0004_ratio) \
end
#define RSPfont_x(prefix,t) \
prefix list \
cylinder (t) 0 0 (2*RSPv0004_ratio) 1 0 0 \
cylinder (t) 0 0 0 1 0 (2*RSPv0004_ratio) \
sphere (t) 0 0 0 \
sphere (t) 0 0 (2*RSPv0004_ratio) \
sphere (t) 1 0 0 \
sphere (t) 1 0 (2*RSPv0004_ratio) \
end
#define RSPfont_y(prefix,t) \
prefix list \
botarc(t) \
cylinder (t) 0 0 0.5 0 0 (2*RSPv0004_ratio) \
cylinder (t) \
1 0 (2*RSPv0004_ratio) \
1 0 (0-RSPv0006_gap) \
botarc(t) translate 0 0 (-0.5-RSPv0006_gap) \
sphere (t) 0 0 (2*RSPv0004_ratio) \
sphere (t) 1 0 (2*RSPv0004_ratio) \
sphere (t) 0 0 (0-RSPv0006_gap) \
end
#define RSPfont_z(prefix,t) \
prefix list \
cylinder (t) \
0 0 (2*RSPv0004_ratio) \
1 0 (2*RSPv0004_ratio) \
cylinder (t) 1 0 (2*RSPv0004_ratio) 0 0 0 \
cylinder (t) 0 0 0 1 0 0 \
sphere (t) 0 0 (2*RSPv0004_ratio) \
sphere (t) 1 0 (2*RSPv0004_ratio) \
sphere (t) 0 0 0 \
sphere (t) 1 0 0 \
end
#define RSPfont_left_brace(prefix,t) \
prefix list \
upperleftquarter(t) translate 0.5 0 0 \
lowerquarter(t) translate -0.5 0 1 \
upperquarter(t) translate -0.5 0 -1 \
lowerleftquarter(t) translate 0.5 0 0 \
sphere (t) 0 0 1 \
sphere (t) 1 0 2 \
sphere (t) 1 0 0 \
end
#define RSPfont_pipe(prefix,t) \
prefix list \
cylsphere(0.75,t) translate 0.5 0 0 \
cylsphere(0.75,t) translate 0.5 0 1.25 \
end
#define RSPfont_right_brace(prefix,t) \
prefix list \
upperquarter(t) translate -0.5 0 0 \
lowerleftquarter(t) translate 0.5 0 1 \
upperleftquarter(t) translate 0.5 0 -1 \
lowerquarter(t) translate -0.5 0 0 \
sphere (t) 0 0 2 \
sphere (t) 1 0 1 \
sphere (t) 0 0 0 \
end
#define RSPfont_tilde(prefix,t) \
prefix list \
intersect \
torus 0.25 (t) 0.25 0 1.75 0 1 0 \
box -1 -1 1.75 1 1 3 \
end \
intersect \
torus 0.25 (t) 0.75 0 1.75 0 1 0 \
box -1 -1 0 2 1 1.75 \
end \
sphere (t) 0 0 1.75 \
sphere (t) 1 0 1.75 \
end
#define RSPfont_angstrom(prefix,t) \
prefix list \
cylinder (t) 0 0 0 0.5 0 2 \
cylinder (t) 1 0 0 0.5 0 2 \
cylinder (t) (0.5-0.5*0.5) 0 0.7 (0.5+0.5*0.5) 0 0.7 \
sphere (t) 0 0 0 \
sphere (t) 1 0 0 \
torus 0.25 ((t)/2) 0.5 0 2.2 0 1 0 \
end
#define RSPfont_angstrom_dan(prefix,t) \
prefix list \
cylinder (t) 0 0 0 0.5 0 2 \
cylinder (t) 1 0 0 0.5 0 2 \
cylinder (t) (0.5-0.5*0.5) 0 0.7 (0.5+0.5*0.5) 0 0.7 \
sphere (t) 0.5 0 2 \
sphere (t) 0 0 0 \
sphere (t) 1 0 0 \
torus 0.25 ((t)/ 2) 0.5 0 2.7 0 1 0 \
end
#endif /* ifndef RSHF_FONT */